package com.sdut.material.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sdut.material.pojo.ProductionMaterial;
import com.sdut.material.mapper.ProductionMaterialMapper;
import com.sdut.material.service.IProductionMaterialService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Yu
 * @since 2022-04-20
 */
@Service
public class ProductionMaterialServiceImpl extends ServiceImpl<ProductionMaterialMapper, ProductionMaterial> implements IProductionMaterialService {
    @Autowired
    private ProductionMaterialMapper productionMaterialMapper;
    @Override
    public ProductionMaterial selectByProductionId(int parseInt) {
        QueryWrapper queryWrapper = new QueryWrapper();
        System.out.println("parseInt: " + parseInt);
        queryWrapper.eq("production_id",parseInt);
        ProductionMaterial productionMaterial = productionMaterialMapper.selectOne(queryWrapper);
//        ProductionMaterial productionMaterial = productionMaterialMapper.selectByProductionId(parseInt);
        return productionMaterial;
    }
}
